import { storeBindingsBehavior } from 'mobx-miniprogram-bindings'
import { store } from '../store/store'
Component({
    behaviors: [storeBindingsBehavior],
    storeBindings: {
        store,
        fields: {
            active: 'active',
            info:'info',
        },
        actions: {
            changePath: "changePath"
        }
    },

    options: {
        // addGlobalClass: true,
    },
    properties: {},
    data: {
        active: "",
        cartNum: 0,
        info: 0,
        list: [
            {
                "pagePath": "pages/index/index",
                "text": "首页",
                "iconPath": "../pages/images/1.png",
                "selectedIconPath": "../pages/images/1_1.png"
            },
            {
                "pagePath": "pages/shop/shop",
                "text": "收藏",
                "iconPath": "../pages/images/2.png",
                "selectedIconPath": "../pages/images/2_1.png"
            },
            {
                "pagePath": "pages/my/my",
                "text": "我的",
                "iconPath": "../pages/images/3.png",
                "selectedIconPath": "../pages/images/3_1.png"
            }]
    },
    methods: {
        onChange(e) {
            this.changePath(e.detail)
            wx.switchTab({
                url: "/" + e.detail,
            })
        },
    },
    created: function () {
    },
});